package algorithmTopics.designPatterns.factoryPattern;

/**
 * 工厂生产者
 *
 * @author 86155
 * @date 2025/07/20
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String factoryName) {
        if (factoryName.equalsIgnoreCase("color")) {
            return new ColorFactory();
        } else if (factoryName.equalsIgnoreCase("shape")) {
            return new ShapeFactory();
        }
        return null;
    }
}
